import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home/index.vue'
import TabBar from '@/components/TabBar.vue'
const routes = [{
    path: '/',
    name: 'home',
    components: {
        default: Home,
        footer: TabBar
    }


}, {
    path: '/cart',
    name: 'cart',
    components: {
        default: () =>
            import ('../views/cart/index.vue'),
        footer: TabBar
    }
}, {
    path: '/detail/:id',
    name: 'detail',
    component: () =>
        import ('../views/detail/detail.vue'),


}, {
    path: '/order',
    name: 'order',
    component: () =>
        import ('../views/order/order.vue'),


}, ]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router